package timkiem;

import java.sql.Connection;
import java.sql.DriverManager;

public class DB_Connector {
	static Connection con;
	static String user = "sa";
	static String pass = "1234567";
	static String database = "Project_QLNHAC_ONLINE";
	
	
	public static Connection getConnection() {
		String url = "jdbc:sqlserver://localhost:1433;databaseName="+database;
		try {
			Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
			con = DriverManager.getConnection(url,user,pass);
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		return con;
	}
}
